package com.example.springbootmqdemo.ackservice;

/**
 * Classname: OrderAckService
 *
 * @Author: Jam
 * @Create 2022/11/29 - 19:26
 * @Version 1.0
 */
public class OrderAckService {

//    @Transactional(rollbackFor = Exception.class)
    public void createOreder( String msg) throws Exception{
        //1 .订单信息插入订单库 此处省略逻辑
        this.saveOrder(msg);

        //2.发送订单信息到配送系统 此处省略逻辑
        this.sendOrder(msg);
    }

    private void saveOrder(String msg) {
        System.out.println("插入订单信息：-------------->" + msg);

    }

    private void sendOrder(String msg) {
        System.out.println("订单已生成，配送中：-------------->" + msg);
    }
}